package com.example.pei.ithinklearnt.view.base;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

import com.example.pei.ithinklearnt.utils.ActivityCollector;

/**
 * 注册的几个活动将继承这个基类，用于添加和销毁活动
 */

public class RegisterBaseActivity extends BaseActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ActivityCollector.addActivity(this);//将活动添加到活动收集器
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        ActivityCollector.removeActivity(this);//将活动移除活动收集器
    }
}
